package com.Service.Impl;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.Dao.BaseDaoI;
import com.Entity.RecNewsListInfo;
import com.Service.RecNewsListInfoService;

@Service("recNewsService")
public class RecNewsListInfoServiceImpl extends
		BaseServiceImpl<RecNewsListInfo> implements RecNewsListInfoService {

	@Autowired
	private BaseDaoI<RecNewsListInfo> recDao;

	List<RecNewsListInfo> recNewsList = new ArrayList<RecNewsListInfo>();

	@Override
	public List<RecNewsListInfo> queryRecNewsList(Integer userid) {
		// TODO Auto-generated method stub
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("userId", userid);
		String hql = "from RecNewsListInfo t where t.userId = :userId";
		recNewsList = this.recDao.find(hql, params);
		return recNewsList;
	}

}
